package com.mes.bac.backend.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@Schema(description = "工位队列/全局任务视图对象")
public class WorkstationQueueVO {

    @Schema(description = "调度记录的唯一ID")
    private Long dispatchId;

    @Schema(description = "工件的唯一ID")
    private String pieceId;

    @Schema(description = "产品名称")
    private String productName;

    @Schema(description = "产品型号")
    private String productType;

    @Schema(description = "在当前工位的加工状态 (1:等待加工, 2:正在加工)")
    private Integer status;

    @Schema(description = "状态的文字描述")
    private String statusText;

    @Schema(description = "在队列中的顺序号")
    private Integer queueId;

    @Schema(description = "标准加工耗时(分钟)")
    private Integer elapsed;

    @Schema(description = "工件当前所在的【具体工位名称】(例如：质检台-A)")
    private String workstationName;

    @Schema(description = "工件当前所在的【具体工位ID】(例如：06)")
    private String workstationId;

    @Schema(description = "工件当前正在执行的【工序类型名称】(例如：质检)")
    private String processName;

    @Schema(description = "工件当前正在执行的【工序类型ID】(例如：601)")
    private Integer processId;

    @Schema(description = "实际开始加工的时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @Schema(description = "累计暂停秒数")
    private Integer totalPausedSeconds;
}